<?
if (!defined('MODULE_FILE')){
die ("cant access file directly!");
}

$mid 	= ( ( true == isset( $_GET['mid'] ) && true == valStr( $_GET['mid'] ) ) ? $_GET['mid'] : NULL );
$smid 	= ( ( true == isset( $_GET['smid'] ) && true == valStr( $_GET['smid'] ) ) ? $_GET['smid'] : NULL );

autoLoader();
$objPatientTypes 	= new PatientCatagories();
?>
<html>
<head>
<?php require_once 'commonJS.php'; ?>
<script>
  $(document).ready(function(){
          $( "#from, #to" ).datepicker({
            dateFormat: 'yy-mm-dd',
            showOn: "button",
			buttonImage: "images/calendar.gif",
			buttonImageOnly: true,
            changeMonth: true,
            changeYear: true,
            yearRange: "-90"
          });
       });
</script>
</head>
<body>
<br>
<div class="col-lg-10">
	<div class="panel panel-primary">
		<div class="panel-heading"><i class="fa fa-bell fa-fw"></i>Patient Visit By Date Report</div>
		<div class="panel-body">
			<form METHOD="POST" action="modules.php?file=view_daily_collection&type=view&mid=<? echo $mid; ?>&smid=<? echo $smid; ?>" id="formSubmit" name="formSubmit">
				<table width="100%" cellspacing="0" cellpadding="3" border="0">
					<tr><td colspan="4" height="10px">&nbsp;</td></tr>
					<tr valign="top" >
						<td width="170">From Date</td>
						<td>
							<input class="validate[required]" readonly type="text" name="from" id="from" value="" style="width:202px;">
						</td>
						<td width="170">To Date</td>
						<td><input class="validate[required]" readonly type="text" name="to" id="to" value="" style="width:202px;"></td>
					</tr>
					<tr><td colspan="4" height="10px">&nbsp;</td></tr>
					<tr valign="top" >
						<td width="170">Patient Type</td>
						<td colspan="3">
							<select  name="p_type_id" id="p_type_id" style="width:202px;">
								<option value=''>------ Select ------</option>
							<?php
								$arrobjPatientTypes = $objPatientTypes->fetchAllPatientCatagories();
								
								if( true == valStr( $arrobjPatientTypes ) ) {
									foreach( $arrobjPatientTypes as $objPatientType ) {
									echo '<option value=' . $objPatientType->getId() . '>' . $objPatientType->getName() . '</option>';
									}
								}
							?>
							</select>
						</td>
					</tr>
					<tr><td colspan="4" height="20px">&nbsp;</td></tr>
					<tr valign="top" >
						<td class="mandatory" width="220">&nbsp;</td>
						<td colspan="3">
						<input type="submit" value="SUBMIT" id="Submit" name="Submit">
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</div>
</body>
</html>